from day02.baseclass import BaseClass
from day02.baseclass import driver
from selenium.webdriver.common.by import By
from day02.frame_base import frame1_operate,frame2_operate
from time import sleep
d=BaseClass()
if __name__=="__main__":
    #定位到主页面
    d.open_browser('file:///E:/%E8%93%AC%E8%8E%B1%E5%B0%8F%E8%AF%BE2024%E6%B5%8B%E8%AF%95/%E7%AC%AC%E5%9B%9B%E9%98%B6%E6%AE%B5/Selenium%E8%87%AA%E5%8A%A8%E5%8C%96/selenium_demo/day06demo/frame/main3.html')
    #mymain1=d.locator(By.ID,"frame1")
    #定位到frame1
    driver.switch_to.frame(0)
    sleep(2)
    frame1_operate()
    #返回到主页面
    driver.switch_to.default_content()
    #定位到frame2
    driver.switch_to.frame(1)
    sleep(2)
    frame2_operate()